package com.itrip.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface FlushOrderStatusMapper {

    @Select(" UPDATE itrip_hotel_order SET  orderStatus  =1 WHERE orderStatus = 0 AND\n" +
            "        timestampdiff(HOUR, creationDate, NOW()) >= 2")
    public  int flushConSumStatus();
    @Select("  UPDATE itrip_hotel_order SET  orderStatus  =3 WHERE orderStatus = 2 AND\n" +
            "        timestampdiff(SECOND, checkOutDate, NOW()) >= 0")
    public  int flushSuccessStatus();
}
